package com.bawan.web.happy.user.service;

import com.bawan.web.happy.user.dao.UserDao;
import com.bawan.web.happy.user.entity.UserEntity;
import com.bawan.web.happy.util.Encrypter;

/**
 * <p> Description	: UserService.java </p>
 * <p> Copyright	: Copyright (c) 2015 by PCI-SUNTEK</p>
 * <p> Author 		: ZCCHUN </p>
 * <p> Create		: 2015年10月22日 下午4:46:31 </p> 
 * <p> version 		: 1.0 </p>
 */
public class UserService {
	private UserDao userDao;
	public UserService(UserDao userDao) {
		this.userDao = userDao;
	}
	
	public boolean addUser(UserEntity entity) {
		entity.setPassword(Encrypter.md5(entity.getPassword()));
		
		return userDao.addUser(entity);
	}
}
